<%@ page language="java" import="java.util.*" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Island View</title>
</head>
<body>
	<%
		ArrayList<Integer> pID = (ArrayList<Integer>)request.getAttribute("USERS");
		ArrayList<Integer> pAdd  = (ArrayList<Integer>)request.getAttribute("Addresses");
		ArrayList<Integer> pSize = (ArrayList<Integer>)request.getAttribute("Size");
		ArrayList<String> pName = (ArrayList<String>)request.getAttribute("UserName");
		Integer Island = (Integer)request.getAttribute("Island");
	%>
	<div style="width: 300px;height: 100%; float: left">
		<a href="Overview" style="width: 300px;float: left">Overview</a>
		<a href="Structures" style="width: 300px;float: left">Structures</a>
		<a href="Research" style="width: 300px;float: left">Research</a>
		<a href="Barracks" style="width: 300px;float: left">Barracks</a>
		<a href="Island" style="width: 300px;float: left">Island</a>
		<a href="Movement" style="width: 300px;float: left">Movement Report</a>
		<a href="Messages" style="width: 300px;float: left">Messages</a>
	</div>
	<div style="left: 300px;">
		<form action="Island" method="get">
			<input type="text" name="address" value="<%=Island%>"/>
			<input type="submit" name="Go"></input>
		</form>
	</div>
	
	<br />
	<table border="1" cellspacing="0" style="float:left;">
		<tr>
			<th>Address</th>
			<th>Player</th>
			<th>Size</th>
		</tr>
		<%
		Iterator<Integer> iter = pID.iterator();
			while(iter.hasNext()){
				Integer next = iter.next();
				int index = pID.indexOf(next);
				%>
					<tr>
						<td><%out.print(pAdd.get(index)%10);%></td>
						<td><%out.print(pName.get(index));%></td>
						<td><%out.print(pSize.get(index));%></td>
					</tr>
				<%
			}
		%>
	</table>
</body>
</html>